<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSizePolicy Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSizePolicy Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QSizePolicy class is a layout attribute describing
horizontal and vertical resizing policy. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qsizepolicy.html#ControlType-enum">ControlType</a></b> { DefaultType, ButtonBox, CheckBox, ComboBox, ..., ToolButton }</li><li><div class="fn" />class <b><a href="qsizepolicy-controltypes.html">ControlTypes</a></b></li><li><div class="fn" />enum <b><a href="qsizepolicy.html#Policy-enum">Policy</a></b> { Fixed, Minimum, Maximum, Preferred, ..., Ignored }</li><li><div class="fn" />enum <b><a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a></b> { GrowFlag, ExpandFlag, ShrinkFlag, IgnoreFlag }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-2">__init__</a></b> (<i>self</i>, Policy&#160;<i>horizontal</i>, Policy&#160;<i>vertical</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-3">__init__</a></b> (<i>self</i>, QVariant&#160;<i>variant</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-4">__init__</a></b> (<i>self</i>, Policy&#160;<i>horizontal</i>, Policy&#160;<i>vertical</i>, ControlType&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#QSizePolicy-5">__init__</a></b> (<i>self</i>, QSizePolicy)</li><li><div class="fn" />ControlType <b><a href="qsizepolicy.html#controlType">controlType</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qsizepolicy.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />Policy <b><a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setControlType">setControlType</a></b> (<i>self</i>, ControlType&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a></b> (<i>self</i>, bool&#160;<i>b</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a></b> (<i>self</i>, Policy&#160;<i>d</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a></b> (<i>self</i>, int&#160;<i>stretchFactor</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a></b> (<i>self</i>, Policy&#160;<i>d</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a></b> (<i>self</i>, int&#160;<i>stretchFactor</i>)</li><li><div class="fn" /><b><a href="qsizepolicy.html#transpose">transpose</a></b> (<i>self</i>)</li><li><div class="fn" />Policy <b><a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsizepolicy.html#verticalStretch">verticalStretch</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qsizepolicy.html#__eq__">__eq__</a></b> (<i>self</i>, QSizePolicy&#160;<i>s</i>)</li><li><div class="fn" />bool <b><a href="qsizepolicy.html#__ne__">__ne__</a></b> (<i>self</i>, QSizePolicy&#160;<i>s</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSizePolicy class is a layout attribute describing
horizontal and vertical resizing policy.</p>
<p>The size policy of a widget is an expression of its willingness
to be resized in various ways, and affects how the widget is
treated by the <a href="layout.html">layout engine</a>. Each widget
returns a QSizePolicy that describes the horizontal and vertical
resizing policy it prefers when being laid out. You can change this
for a specific widget by changing its <a href="qwidget.html#sizePolicy-prop">QWidget.sizePolicy</a>
property.</p>
<p>QSizePolicy contains two independent <a href="qsizepolicy.html#Policy-enum">QSizePolicy.Policy</a> values and
two stretch factors; one describes the widgets's horizontal size
policy, and the other describes its vertical size policy. It also
contains a flag to indicate whether the height and width of its
preferred size are related.</p>
<p>The horizontal and vertical policies can be set in the
constructor, and altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>()
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>()
functions. The stretch factors can be set using the <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>()
functions. The flag indicating whether the widget's <a href="qwidget.html#sizeHint-prop">sizeHint()</a> is width-dependent
(such as a menu bar or a word-wrapping label) can be set using the
<a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>()
function.</p>
<p>The current size policies and stretch factors be retrieved using
the <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(),
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>() and
<a href="qsizepolicy.html#verticalStretch">verticalStretch</a>()
functions. Alternatively, use the <a href="qsizepolicy.html#transpose">transpose</a>() function to swap the
horizontal and vertical policies and stretches. The <a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>()
function returns the current status of the flag indicating the size
hint dependencies.</p>
<p>Use the <a href="qsizepolicy.html#expandingDirections">expandingDirections</a>()
function to determine whether the associated widget can make use of
more space than its <a href="qwidget.html#sizeHint-prop">sizeHint()</a> function indicates, as
well as find out in which directions it can expand.</p>
<p>Finally, the QSizePolicy class provides operators comparing this
size policy to a given policy, as well as a <a href="qvariant.html">QVariant</a> operator storing this QSizePolicy as a
<a href="qvariant.html">QVariant</a> object.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ControlType-enum" />QSizePolicy.ControlType</h3><p>This enum specifies the different types of widgets in terms of
layout interaction:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.DefaultType</tt></td>
<td class="topAlign"><tt>0x00000001</tt></td>
<td class="topAlign">The default type, when none is specified.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ButtonBox</tt></td>
<td class="topAlign"><tt>0x00000002</tt></td>
<td class="topAlign">A <a href="qdialogbuttonbox.html">QDialogButtonBox</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.CheckBox</tt></td>
<td class="topAlign"><tt>0x00000004</tt></td>
<td class="topAlign">A <a href="qcheckbox.html">QCheckBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ComboBox</tt></td>
<td class="topAlign"><tt>0x00000008</tt></td>
<td class="topAlign">A <a href="qcombobox.html">QComboBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Frame</tt></td>
<td class="topAlign"><tt>0x00000010</tt></td>
<td class="topAlign">A <a href="qframe.html">QFrame</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.GroupBox</tt></td>
<td class="topAlign"><tt>0x00000020</tt></td>
<td class="topAlign">A <a href="qgroupbox.html">QGroupBox</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Label</tt></td>
<td class="topAlign"><tt>0x00000040</tt></td>
<td class="topAlign">A <a href="qlabel.html">QLabel</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Line</tt></td>
<td class="topAlign"><tt>0x00000080</tt></td>
<td class="topAlign">A <a href="qframe.html">QFrame</a> instance
with <a href="qframe.html#Shape-enum">QFrame.HLine</a> or <a href="qframe.html#Shape-enum">QFrame.VLine</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.LineEdit</tt></td>
<td class="topAlign"><tt>0x00000100</tt></td>
<td class="topAlign">A <a href="qlineedit.html">QLineEdit</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.PushButton</tt></td>
<td class="topAlign"><tt>0x00000200</tt></td>
<td class="topAlign">A <a href="qpushbutton.html">QPushButton</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.RadioButton</tt></td>
<td class="topAlign"><tt>0x00000400</tt></td>
<td class="topAlign">A <a href="qradiobutton.html">QRadioButton</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Slider</tt></td>
<td class="topAlign"><tt>0x00000800</tt></td>
<td class="topAlign">A <a href="qabstractslider.html">QAbstractSlider</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.SpinBox</tt></td>
<td class="topAlign"><tt>0x00001000</tt></td>
<td class="topAlign">A <a href="qabstractspinbox.html">QAbstractSpinBox</a> instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.TabWidget</tt></td>
<td class="topAlign"><tt>0x00002000</tt></td>
<td class="topAlign">A <a href="qtabwidget.html">QTabWidget</a>
instance.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ToolButton</tt></td>
<td class="topAlign"><tt>0x00004000</tt></td>
<td class="topAlign">A <a href="qtoolbutton.html">QToolButton</a>
instance.</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.3.</p>
<p>The ControlTypes type is a typedef for <a href="qflags.html">QFlags</a>&lt;ControlType&gt;. It stores an OR
combination of ControlType values.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setControlType">setControlType</a>() and <a href="qsizepolicy.html#controlType">controlType</a>().</p>


<h3 class="fn"><a name="Policy-enum" />QSizePolicy.Policy</h3><p>This enum describes the various per-dimension sizing types used
when constructing a <a href="qsizepolicy.html">QSizePolicy</a>.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Fixed</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>() is the only
acceptable alternative, so the widget can never grow or shrink
(e.g. the vertical direction of a push button).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Minimum</tt></td>
<td class="topAlign"><tt>GrowFlag</tt></td>
<td class="topAlign">The sizeHint() is minimal, and sufficient. The
widget can be expanded, but there is no advantage to it being
larger (e.g. the horizontal direction of a push button). It cannot
be smaller than the size provided by sizeHint().</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Maximum</tt></td>
<td class="topAlign"><tt>ShrinkFlag</tt></td>
<td class="topAlign">The sizeHint() is a maximum. The widget can be
shrunk any amount without detriment if other widgets need the space
(e.g. a separator line). It cannot be larger than the size provided
by sizeHint().</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Preferred</tt></td>
<td class="topAlign"><tt>GrowFlag | ShrinkFlag</tt></td>
<td class="topAlign">The sizeHint() is best, but the widget can be
shrunk and still be useful. The widget can be expanded, but there
is no advantage to it being larger than sizeHint() (the default
<a href="qwidget.html">QWidget</a> policy).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Expanding</tt></td>
<td class="topAlign"><tt>GrowFlag | ShrinkFlag |
ExpandFlag</tt></td>
<td class="topAlign">The sizeHint() is a sensible size, but the
widget can be shrunk and still be useful. The widget can make use
of extra space, so it should get as much space as possible (e.g.
the horizontal direction of a horizontal slider).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.MinimumExpanding</tt></td>
<td class="topAlign"><tt>GrowFlag | ExpandFlag</tt></td>
<td class="topAlign">The sizeHint() is minimal, and sufficient. The
widget can make use of extra space, so it should get as much space
as possible (e.g. the horizontal direction of a horizontal
slider).</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.Ignored</tt></td>
<td class="topAlign"><tt>ShrinkFlag | GrowFlag |
IgnoreFlag</tt></td>
<td class="topAlign">The sizeHint() is ignored. The widget will get
as much space as possible.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a>, <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>


<h3 class="fn"><a name="PolicyFlag-enum" />QSizePolicy.PolicyFlag</h3><p>These flags are combined together to form the various <a href="qsizepolicy.html#Policy-enum">Policy</a> values:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.GrowFlag</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The widget can grow beyond its size hint if
necessary.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ExpandFlag</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The widget should get as much space as
possible.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.ShrinkFlag</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The widget can shrink below its size hint if
necessary.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSizePolicy.IgnoreFlag</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">The widget's size hint is ignored. The widget
will get as much space as possible.</td>
</tr>
</table>
<p><b>See also</b> <a href="qsizepolicy.html#Policy-enum">Policy</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSizePolicy" />QSizePolicy.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with <a href="qsizepolicy.html#Policy-enum">Fixed</a> as its
horizontal and vertical policies.</p>
<p>The policies can be altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>()
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>()
functions. Use the <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>()
function if the preferred height of the widget is dependent on the
width of the widget (for example, a <a href="qlabel.html">QLabel</a> with line wrapping).</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>


<h3 class="fn"><a name="QSizePolicy-2" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>horizontal</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>vertical</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with the given <i>horizontal</i> and <i>vertical</i> policies, and
<a href="qsizepolicy.html#ControlType-enum">DefaultType</a> as the
control type.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the
preferred height of the widget is dependent on the width of the
widget (for example, a <a href="qlabel.html">QLabel</a> with line
wrapping).</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>()
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>


<h3 class="fn"><a name="QSizePolicy-3" />QSizePolicy.__init__ (<i>self</i>, QVariant&#160;<i>variant</i>)</h3><p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object
with the given <i>horizontal</i> and <i>vertical</i> policies, and
the specified control <i>type</i>.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the
preferred height of the widget is dependent on the width of the
widget (for example, a <a href="qlabel.html">QLabel</a> with line
wrapping).</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
<a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and
<a href="qsizepolicy.html#controlType">controlType</a>().</p>


<h3 class="fn"><a name="QSizePolicy-4" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>horizontal</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>vertical</i>, <a href="qsizepolicy.html#ControlType-enum">ControlType</a>&#160;<i>type</i>)</h3><h3 class="fn"><a name="QSizePolicy-5" />QSizePolicy.__init__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a>)</h3><h3 class="fn"><a name="controlType" /><a href="qsizepolicy.html#ControlType-enum">ControlType</a> QSizePolicy.controlType (<i>self</i>)</h3><p>Returns the control type associated with the widget for which
this size policy applies.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setControlType">setControlType</a>().</p>


<h3 class="fn"><a name="expandingDirections" /><a href="qt-orientations.html">Qt.Orientations</a> QSizePolicy.expandingDirections (<i>self</i>)</h3><p>Returns whether a widget can make use of more space than the
<a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>()
function indicates.</p>
<p>A value of <a href="qt.html#Orientation-enum">Qt.Horizontal</a>
or <a href="qt.html#Orientation-enum">Qt.Vertical</a> means that
the widget can grow horizontally or vertically (i.e., the
horizontal or vertical policy is <a href="qsizepolicy.html#Policy-enum">Expanding</a> or <a href="qsizepolicy.html#Policy-enum">MinimumExpanding</a>), whereas
<a href="qt.html#Orientation-enum">Qt.Horizontal</a> | <a href="qt.html#Orientation-enum">Qt.Vertical</a> means that it can grow
in both dimensions.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>() and
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>


<h3 class="fn"><a name="hasHeightForWidth" />bool QSizePolicy.hasHeightForWidth (<i>self</i>)</h3><p>Returns true if the widget's preferred height depends on its
width; otherwise returns false.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>().</p>


<h3 class="fn"><a name="horizontalPolicy" /><a href="qsizepolicy.html#Policy-enum">Policy</a> QSizePolicy.horizontalPolicy (<i>self</i>)</h3><p>Returns the horizontal component of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), and
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>().</p>


<h3 class="fn"><a name="horizontalStretch" />int QSizePolicy.horizontalStretch (<i>self</i>)</h3><p>Returns the horizontal stretch factor of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
<a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(),
and <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>().</p>


<h3 class="fn"><a name="setControlType" />QSizePolicy.setControlType (<i>self</i>, <a href="qsizepolicy.html#ControlType-enum">ControlType</a>&#160;<i>type</i>)</h3><p>Sets the control type associated with the widget for which this
size policy applies to <i>type</i>.</p>
<p>The control type specifies the type of the widget for which this
size policy applies. It is used by some styles, notably <a href="qmacstyle.html">QMacStyle</a>, to insert proper spacing between
widgets. For example, the Mac OS X Aqua guidelines specify that
push buttons should be separated by 12 pixels, whereas vertically
stacked radio buttons only require 6 pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qsizepolicy.html#controlType">controlType</a>() and <a href="qstyle.html#layoutSpacing">QStyle.layoutSpacing</a>().</p>


<h3 class="fn"><a name="setHeightForWidth" />QSizePolicy.setHeightForWidth (<i>self</i>, bool&#160;<i>b</i>)</h3><p>Sets the flag determining whether the widget's preferred height
depends on its width, to <i>dependent</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>() and
<a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a>().</p>


<h3 class="fn"><a name="setHorizontalPolicy" />QSizePolicy.setHorizontalPolicy (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>d</i>)</h3><p>Sets the horizontal component to the given <i>policy</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
<a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(),
and <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>().</p>


<h3 class="fn"><a name="setHorizontalStretch" />QSizePolicy.setHorizontalStretch (<i>self</i>, int&#160;<i>stretchFactor</i>)</h3><p>Sets the horizontal stretch factor of the size policy to the
given <i>stretchFactor</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(),
<a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and
<a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>().</p>


<h3 class="fn"><a name="setVerticalPolicy" />QSizePolicy.setVerticalPolicy (<i>self</i>, <a href="qsizepolicy.html#Policy-enum">Policy</a>&#160;<i>d</i>)</h3><p>Sets the vertical component to the given <i>policy</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(),
and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>


<h3 class="fn"><a name="setVerticalStretch" />QSizePolicy.setVerticalStretch (<i>self</i>, int&#160;<i>stretchFactor</i>)</h3><p>Sets the vertical stretch factor of the size policy to the given
<i>stretchFactor</i>.</p>
<p><b>See also</b> <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(), <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(),
and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>


<h3 class="fn"><a name="transpose" />QSizePolicy.transpose (<i>self</i>)</h3><p>Swaps the horizontal and vertical policies and stretches.</p>


<h3 class="fn"><a name="verticalPolicy" /><a href="qsizepolicy.html#Policy-enum">Policy</a> QSizePolicy.verticalPolicy (<i>self</i>)</h3><p>Returns the vertical component of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(),
<a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(),
and <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>().</p>


<h3 class="fn"><a name="verticalStretch" />int QSizePolicy.verticalStretch (<i>self</i>)</h3><p>Returns the vertical stretch factor of the size policy.</p>
<p><b>See also</b> <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(),
<a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(), and
<a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QSizePolicy.__eq__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a>&#160;<i>s</i>)</h3><h3 class="fn"><a name="__ne__" />bool QSizePolicy.__ne__ (<i>self</i>, <a href="qsizepolicy.html">QSizePolicy</a>&#160;<i>s</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>